-
Notifications
You must be signed in to change notification settings - Fork 924
Add ReadonlyUint8Array to codecs + allow decoding from it #2391
Conversation
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @mcintyre94 and the rest of your teammates on Graphite |
1030568
to
a89252f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty amazed that this is all that's required on the codecs side to support ReadonlyUint8Arrays
. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9e0e647
to
da2fc12
Compare
a89252f
to
f6d9e8e
Compare
9445912
to
39f3321
Compare
f6d9e8e
to
6d5b8ef
Compare
🎉 This PR is included in version 1.91.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up. |
This PR adds the proposed
ReadonlyUint8Array
type tocodecs-core
. TheDecoder
interface is modified to allow decoding from aReadonlyUint8Array | Uint8Array
. This will allow us to useReadonlyUint8Array
for various byte encodings, while still being able to decode them as normal byte arrays.The only place where I needed to add an extra copy is in
reverseCodec
, which was reversing the input bytes in place. It now creates and reverses a new Uint8Array from the input bytes.Addresses #2362.